package com.example.testdemo;

import android.content.Context;
import android.os.Bundle;
import android.util.Log;

import androidx.appcompat.app.AppCompatActivity;

import com.example.testdemo.annotation.BeanScan;
import com.example.testdemo.spring.ApplicationContext;
import com.think.height.annotation.Comppent;


@BeanScan(packages = "com.example.testdemo")
public class MainActivity extends AppCompatActivity {

    public static Context context;
    public static MainActivity thisApp;
    public static ApplicationContext applicationContext;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Log.i("Aty1", "执行onCreate");
        applicationContext = new ApplicationContext(this);
        Tiger tiger = applicationContext.getBean("tiger");
        tiger.eat();
        //setContentView(R.layout.activity_main);
    }



    private void initIoc() {
        applicationContext = new ApplicationContext(this);

        Tiger tiger = applicationContext.getBean("tiger");
        tiger.eat();
    }


}
